package com.ruisoft.business.purchase.bean;

import javax.persistence.*;

/**
 * Created with IntelliJ IDEA.
 * User: LFC
 * Date: 2015/6/23
 * Time: 22:30
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name = "purchase_person", schema = "", catalog = "ruitest")
public class PurchasePerson {
    private String purchaseperId;
    private String purchateamCode;
    private String purchaserCode;
    private String purchaserName;
    private String purchaserPhone;
    private String note;
    private String createUser;
    private String createDate;
    private String writeUser;
    private String writeDate;

    @Id
    @Column(name = "purchaseper_id", nullable = false, insertable = true, updatable = true, length = 36)
    public String getPurchaseperId() {
        return purchaseperId;
    }

    public void setPurchaseperId(String purchaseperId) {
        this.purchaseperId = purchaseperId;
    }

    @Basic
    @Column(name = "purchateam_code", nullable = true, insertable = true, updatable = true, length = 36)
    public String getPurchateamCode() {
        return purchateamCode;
    }

    public void setPurchateamCode(String purchateamCode) {
        this.purchateamCode = purchateamCode;
    }

    @Basic
    @Column(name = "purchaser_code", nullable = true, insertable = true, updatable = true, length = 36)
    public String getPurchaserCode() {
        return purchaserCode;
    }

    public void setPurchaserCode(String purchaserCode) {
        this.purchaserCode = purchaserCode;
    }

    @Basic
    @Column(name = "purchaser_name", nullable = true, insertable = true, updatable = true, length = 36)
    public String getPurchaserName() {
        return purchaserName;
    }

    public void setPurchaserName(String purchaserName) {
        this.purchaserName = purchaserName;
    }

    @Basic
    @Column(name = "purchaser_phone", nullable = true, insertable = true, updatable = true, length = 36)
    public String getPurchaserPhone() {
        return purchaserPhone;
    }

    public void setPurchaserPhone(String purchaserPhone) {
        this.purchaserPhone = purchaserPhone;
    }

    @Basic
    @Column(name = "note", nullable = true, insertable = true, updatable = true, length = 256)
    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    @Basic
    @Column(name = "CreateUser", nullable = true, insertable = true, updatable = true, length = 20)
    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    @Basic
    @Column(name = "CreateDate", nullable = true, insertable = true, updatable = true, length = 20)
    public String getCreateDate() {
        return createDate;
    }

    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }

    @Basic
    @Column(name = "WriteUser", nullable = true, insertable = true, updatable = true, length = 20)
    public String getWriteUser() {
        return writeUser;
    }

    public void setWriteUser(String writeUser) {
        this.writeUser = writeUser;
    }

    @Basic
    @Column(name = "WriteDate", nullable = true, insertable = true, updatable = true, length = 20)
    public String getWriteDate() {
        return writeDate;
    }

    public void setWriteDate(String writeDate) {
        this.writeDate = writeDate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        PurchasePerson that = (PurchasePerson) o;

        if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
        if (createUser != null ? !createUser.equals(that.createUser) : that.createUser != null) return false;
        if (note != null ? !note.equals(that.note) : that.note != null) return false;
        if (purchaseperId != null ? !purchaseperId.equals(that.purchaseperId) : that.purchaseperId != null)
            return false;
        if (purchaserCode != null ? !purchaserCode.equals(that.purchaserCode) : that.purchaserCode != null)
            return false;
        if (purchaserName != null ? !purchaserName.equals(that.purchaserName) : that.purchaserName != null)
            return false;
        if (purchaserPhone != null ? !purchaserPhone.equals(that.purchaserPhone) : that.purchaserPhone != null)
            return false;
        if (purchateamCode != null ? !purchateamCode.equals(that.purchateamCode) : that.purchateamCode != null)
            return false;
        if (writeDate != null ? !writeDate.equals(that.writeDate) : that.writeDate != null) return false;
        if (writeUser != null ? !writeUser.equals(that.writeUser) : that.writeUser != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = purchaseperId != null ? purchaseperId.hashCode() : 0;
        result = 31 * result + (purchateamCode != null ? purchateamCode.hashCode() : 0);
        result = 31 * result + (purchaserCode != null ? purchaserCode.hashCode() : 0);
        result = 31 * result + (purchaserName != null ? purchaserName.hashCode() : 0);
        result = 31 * result + (purchaserPhone != null ? purchaserPhone.hashCode() : 0);
        result = 31 * result + (note != null ? note.hashCode() : 0);
        result = 31 * result + (createUser != null ? createUser.hashCode() : 0);
        result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
        result = 31 * result + (writeUser != null ? writeUser.hashCode() : 0);
        result = 31 * result + (writeDate != null ? writeDate.hashCode() : 0);
        return result;
    }
}
